<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$Think.config.site.title} - 主页</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">
    <meta name="description" content="{$Think.config.site.description}">
	<link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!-- Morris -->
    <link href="{$Think.config.site.resource_url}css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
    <!-- Gritter -->
    <link href="{$Think.config.site.resource_url}js/plugins/gritter/jquery.gritter.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.css?v=4.1.0" rel="stylesheet">
</head>
<style type="text/css">
    .no-margins{ font-size: 14px; }
    .no-margins font{ font-size: 30px; }
    .no-margins span{ float: right; }
    .flot-chart{ height: auto; }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-success pull-right">{:lang('本月')}</span>
                    <h5>{:lang('总成交订单')}</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{:lang('开户订单')}:<font style="color:#ff0000;">{$data.month}</font><span>{:lang('成交订单')}:<font>{$data.monthSumOrder}</font></span></h1>
                    <!-- <div class="stat-percent font-bold text-success">98% <i class="fa fa-bolt"></i>
                    </div> -->
                    <small></small>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-info pull-right">{:lang('本周')}</span>
                    <h5>{:lang('新用户')}</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{:lang('新开户')}:<font style="color:#ff0000;">{$weekoperator}</font><span>{:lang('新注册用户')}:<font>{$data.weekuser}</font></span></h1>
                    <!-- <div class="stat-percent font-bold text-info">20% <i class="fa fa-level-up"></i> 
                    </div>-->
                    <small></small>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-primary pull-right">{:lang('全部')}</span>
                    <h5>{:lang('设备中心')}</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{:lang('当前在线')}:<font style="color:#ff0000;">{$data.online}</font><span>{:lang('总设备数')}:<font>{$data.totalCabinet}</font></span></h1>
                    <!-- <div class="stat-percent font-bold text-navy">44% <i class="fa fa-level-up"></i>
                    </div> -->
                    <small></small>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-danger pull-right">{:lang('全部')}</span>
                    <h5>{:lang('用户')}</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins">{:lang('总代理商户')}:<font style="color:#ff0000;">{$data.merchant}</font><span>{:lang('总用户数')}:<font>{$data.usertotal}</font></span></h1>
                    <small></small>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{:lang('本月代理商经营情况')}</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="flot-chart">
                                <div class="flot-chart-content" id="order" style=" height:500px;" ></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">

    </div>
    <!-- 全局js -->
    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.6"></script>
    <!-- ECharts -->
    <script src="{$Think.config.site.resource_url}js/plugins/echarts/echarts-all.js"></script>
    <!-- 自定义js -->
    <script src="{$Think.config.site.resource_url}js/content.js?v=1.0.0"></script>
    <!-- ECharts demo data -->
    <script src="{$Think.config.site.resource_url}js/demo/echarts-demo.js"></script>
<script>
if( !window.top.length){
    location.href="<?php echo \think\Request::instance()->root(); ?>/ausadmin/Index/index";
};
    var  myChart = echarts.init(document.getElementById('order'));
    option = {
    noDataLoadingOption: {
        text: "{:lang('暂无数据')}",
        effect: 'bubble',
        effectOption: {
            effect: {
                n: 0
            }
        }
    },
    title : {
        text: "{:lang('本月代理商经营情况')}",
        subtext: ''
    },
    tooltip : {
        trigger: 'axis'
    },
    legend: {
        data:["{:lang('本月经营情况')}"]
    },
    toolbox: {
        show : true,
        feature : {
            mark : {show: true},
            dataView : {show: true, readOnly: false},
            magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
            restore : {show: true},
            saveAsImage : {show: true}
        }
    },
    calculable : true,
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : [{volist name="monthRent" id="v"}"{$v.unit} {:lang('日')}", {/volist}]
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:"{:lang('本周租金额')}",
            type:'line',
            smooth:true,
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data:[{volist name="monthRent" id="v"}{$v.amount},{/volist}]
        }
        
    ]
};
 myChart.setOption(option);
</script>

</body>
</html>